home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2003-07-17 | 76.7 KB | 3,058 lines
// Copyright (C) 1997-2002 Alias|Wavefront, // a division of Silicon Graphics Limited. // // The information in this file is provided for the exclusive use of the // licensees of Alias|Wavefront. Such users have the right to use, modify, // and incorporate this code into other products for purposes authorized // by the Alias|Wavefront license agreement, without fee. // // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. // // // Alias|Wavefront Script File // MODIFY THIS AT YOUR OWN RISK // // Creation Date: Jan 2000 // // Description: // // These procedures create the UI for the Preferences window. // - Each procedure should only create the UI. // - Create any optvars in "createPreferenceOptvars.mel" // - Set the state of the UI in the update procedures // found in updatePrefWndUI.mel // - Commands attached to controls should not change the // optionVar status as this will affect the canel/reset. // // Note: If adding preferences, make sure to read // http://w3.tor.aw.sgi.com/maya/TechDoc/CodingGuides/addingPreferences.html // //---------------------------------------------------------------- // // Begin section of callback procedures // //---------------------------------------------------------------- global proc prefApplyWorkingMode() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $newMode = `optionMenuGrp -q -v modeOpts`; switch( $newMode ) { case "Animation": workingMode Animation; break; case "Modeling": workingMode Modeling; break; case "Rendering": workingMode Rendering; break; case "Dynamics": workingMode Dynamics; break; default: workingMode Animation; break; } } global proc setUpAxis(string $axis) { switch ($axis) { case "y": if (`upAxis -q -axis` != "y") { upAxis -axis y -rv; } break; case "z": if (`upAxis -q -axis` != "z") { upAxis -axis z -rv; } break; } } global proc toggleMenuBarsInPanels( int $state ) { global int $gUseMenusInPanels; $gUseMenusInPanels = $state; // Walk through all the panels and switch them // string $panels[] = `getPanel -allPanels`; string $panel; for ( $panel in $panels ) { panel -e -mbv $state $panel; } } global proc setPrefChannelsLayersVisible( int $state ) // // Description: // This procedure is called when the Channel Box / Layer Editor // visibility check box is toggled by the user. // // Set the appropriate visibility. // Doing so may hide other components because only one is allowed // to be visible at the same time. It is therefore necessary to // update the state of the other component's visibility check boxes. // // Arguments: // state - The current value of visibility check box. // { // Toggle the visibility of the Channel Box / Layer Editor. // setChannelsLayersVisible ($state); // Update the state of the other visibility check boxes. // checkBoxGrp -edit -value1 `isUIComponentVisible("Attribute Editor")` attributeEditorCheckBox; checkBoxGrp -edit -value1 `isUIComponentVisible("Tool Settings")` toolSettingsCheckBox; } global proc setPrefAttrEditorVisible( int $state ) // // Description: // This procedure is called when the Attribute Editor visibility check // box is toggled by the user. // // Set the appropriate visibility for the Attribute Editor. // Doing so may hide other components because only one is allowed // to be visible at the same time. It is therefore necessary to // update the state of the other component's visibility check boxes. // // Arguments: // state - The current value of the Attribute Editor visibility // check box. // { // Toggle the visibility of the Attribute Editor. // setAttributeEditorVisible ($state); // Update the state of the other visibility check boxes. // checkBoxGrp -edit -value1 `isUIComponentVisible("Channel Box / Layer Editor")` channelsLayersCheckBox; checkBoxGrp -edit -value1 `isUIComponentVisible("Tool Settings")` toolSettingsCheckBox; } global proc setPrefToolSettingsVisible( int $state ) // // Description: // This procedure is called when the Tool Settings visibility check // box is toggled by the user. // // Set the appropriate visibility for the Tool Settings. // Doing so may hide other components because only one is allowed // to be visible at the same time. It is therefore necessary to // update the state of the other component's visibility check boxes. // // Arguments: // state - The current value of the Tool Settings visibility // check box. // { // Toggle the visibility of the Tool Settings. // setToolSettingsVisible ($state); // Update the state of the other visibility check boxes. // checkBoxGrp -edit -value1 `isUIComponentVisible("Channel Box / Layer Editor")` channelsLayersCheckBox; checkBoxGrp -edit -value1 `isUIComponentVisible("Attribute Editor")` attributeEditorCheckBox; } global proc prefExprEdTextEditor(int $isStartup) { int $whichEditor = `optionMenuGrp -q -sl textEdOpts`; optionVar -iv "EEexprEdTextEditor" $whichEditor; if (!$isStartup && $whichEditor == 6) { string $theMessage = "Set your own editor with preferred flags by setting the\nenvironment variable \"WINEDITOR\", if it is not already set.\nYou can set it at the command window or through the SGI\nDesktop menu --DeskTop/Desktop/Default Editor.\nWarning: the editor must be set to run in the foreground.\n"; string $winEditor = getenv("WINEDITOR"); if (size($winEditor) == 0) { $theMessage = $theMessage + "Currently \"WINEDITOR\" is not set."; } else { $theMessage = $theMessage + "\"WINEDITOR\" is now set to \"" + $winEditor + "\"."; } confirmDialog -t "Information" -ma "left" -m $theMessage -b "Close" -cb "Close" -parent uiPreferenceWindow; } } global proc prefWndUnitsChanged(string $whichUnits) { global string $gPreferenceWindow; setParent $gPreferenceWindow; if ("linear" == $whichUnits) { changeLinearUnit( `optionMenuGrp -q -v linearOpts` ); } else if ("angular" == $whichUnits) { if (`optionMenuGrp -q -sl angularOpts` == 1) { currentUnit -a degree; } else { currentUnit -a radian; } } else { int $which = `optionMenuGrp -q -sl timeOpts`; int $updateAnimation = !`checkBoxGrp -query -value1 updateKeys`; switch ($which) { case 1: currentUnit -t game -updateAnimation $updateAnimation; break; case 2: currentUnit -t film -updateAnimation $updateAnimation; break; case 3: currentUnit -t pal -updateAnimation $updateAnimation; break; case 4: currentUnit -t ntsc -updateAnimation $updateAnimation; break; case 5: currentUnit -t show -updateAnimation $updateAnimation; break; case 6: currentUnit -t palf -updateAnimation $updateAnimation; break; case 7: currentUnit -t ntscf -updateAnimation $updateAnimation; break; case 8: currentUnit -t millisec -updateAnimation $updateAnimation; break; case 9: currentUnit -t sec -updateAnimation $updateAnimation; break; case 10: currentUnit -t min -updateAnimation $updateAnimation; break; case 11: currentUnit -t hour -updateAnimation $updateAnimation; break; } // Reset the state of the updateKeys checkBox // checkBoxGrp -edit -value1 off updateKeys; // Changing the current time unit has side // effects so we need to update some optionVars optionVar -fv playbackMin `playbackOptions -q -min` -fv playbackMax `playbackOptions -q -max`; } } global proc dynPrefSetRunup( int $state ) // // Description: // Set the state of the runup preference. // { dynPref -rt $state; radioButtonGrp -e -enable $state dynRunupFrom; } global proc prefWndAnimOptionChanged( int $setSpeed ) { global string $gPreferenceWindow; setParent $gPreferenceWindow; int $which; float $speed; int $enableBy = 0; float $otherVal = `floatField -query -value playbackSpeedFF`; $which = `optionMenu -q -sl speedOpts`; switch ($which) { case 1: $speed = 0.0; $enableBy = 1; break; case 2: $speed = 1.0; break; case 3: $speed = 0.5; break; case 4: $speed = 2.0; break; case 5: $speed = $otherVal; break; default: $speed = 0.0; break; } if( $setSpeed ) { playbackOptions -playbackSpeed $speed; text -edit -enable ($which == 5) playbackSpeedT; floatField -edit -enable ($which == 5) playbackSpeedFF; rowLayout -edit -enable $enableBy playbackByRow; } // Now update the UI to indicate the frames-per-second values as well // string $unit = `currentUnit -q -time`; float $fps = 0; if( $unit == "game" ) { $fps = 15; } else if( $unit == "film" ) { $fps = 24; } else if( $unit == "pal" ) { $fps = 25; } else if( $unit == "ntsc" ) { $fps = 30; } else if( $unit == "show" ) { $fps = 48; } else if( $unit == "palf" ) { $fps = 50; } else if( $unit == "ntscf" ) { $fps = 60; } // Only change the labels on the menu items if it makes // sense to. // string $realTimeLabel = "Real-time"; string $halfTimeLabel = "Half"; string $twiceTimeLabel = "Twice"; string $otherTimeLabel = "Other"; if( $fps != 0 ) { $realTimeLabel += (" [" + ($fps*1.0) + " fps]"); $halfTimeLabel += (" [" + ($fps*0.5) + " fps]"); $twiceTimeLabel += (" [" + ($fps*2) + " fps]"); if( ! equivalent( 0.0, $otherVal ) ) { $otherTimeLabel += (" [" + ($fps*$otherVal) + " fps]"); } } menuItem -e -l ("Play every frame") playbackSpeedFree; menuItem -e -l $realTimeLabel playbackSpeedNormal; menuItem -e -l $halfTimeLabel playbackSpeedHalf; menuItem -e -l $twiceTimeLabel playbackSpeedTwice; menuItem -e -l $otherTimeLabel playbackSpeedOther; // Update the playbackSpeed HUD. // if (`exists updatePlaybackSpeedHUD`) { updatePlaybackSpeedHUD(); } } global proc prefSelectPriorListChanged() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $selected[] = `textScrollList -q -si priorList`; int $val = eval("selectPriority -q -"+$selected[0]); intFieldGrp -e -v1 $val priorVal; } global proc prefSelectPriorValChanged() { global string $gSelItems[]; global int $gCustomSelPriority[]; global string $gPreferenceWindow; setParent $gPreferenceWindow; string $selected[] = `textScrollList -q -si priorList`; int $selIndex[] = `textScrollList -q -sii priorList`; string $type; int $val; int $i = 0; // Update each selected priority. // for ($type in $selected) { $val = `intFieldGrp -q -v1 priorVal`; eval("selectPriority -"+$selected[$i] +" "+ $val); // If we're saving custom priorities, then record the change // if ("Custom" == `optionMenu -q -v presetOpts`) { // Because the elements of $gCustomSelPriority correspond to the // ordering used in $gSelItems and _not_ alphabetical ordering, then // we must find the proper non-alphabetical index to set the value. // int $optionVarIndex; for($optionVarIndex = 0; $optionVarIndex < size($gSelItems); $optionVarIndex++) { if($gSelItems[$optionVarIndex] == $type) { $gCustomSelPriority[$optionVarIndex] = $val; break; } } } $i++; } } global proc prefSelectPriorModeChanged() { global string $gPreferenceWindow; setParent $gPreferenceWindow; int $priorityPreset = `optionMenu -q -sl presetOpts`; switch ($priorityPreset) { case 1: // Custom selPriority "custom"; intFieldGrp -e -en true priorVal; break; case 2: // Anim selPriority "animation"; intFieldGrp -e -en false priorVal; break; case 3: // NURBS selPriority "nurbs"; intFieldGrp -e -en false priorVal; break; case 4: // Render selPriority "rendering"; intFieldGrp -e -en false priorVal; break; case 5: // Dynamics selPriority "dynamics"; intFieldGrp -e -en false priorVal; break; } string $selected[] = `textScrollList -q -si priorList`; int $val = eval("selectPriority -q -"+$selected[0]); intFieldGrp -e -v1 $val priorVal; } global proc prefsChangeOutputType(int $mode) { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $goAhead = "OK"; int $curType = `modelWithType (-1)`; // If the current type is 'mixed' then warning the user if ($curType == -1) { string $theMessage = "Changing the output geometry type will override the individual values "+ "set through the Option Boxes.\n"+ "This action is not undoable "+ "and Revert or Cancel will not reset these values.\n\n"+ "Do you want to make this change?"; $goAhead = `confirmDialog -t "Information" -messageAlign "left" -message $theMessage -button "OK" -button "Cancel" -defaultButton "Cancel" -cancelButton "Cancel" -parent $gPreferenceWindow`; } if ($goAhead == "OK") { modelWithType($mode); radioButtonGrp -e -enable 0 modelWithType5; } else { // Reset the 'mixed' button radioButtonGrp -e -sl 1 -enable 1 modelWithType5; } } global proc prefsChangeToolType(int $mode) { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $goAhead = "OK"; int $curType = `modelWithToolsAll (-1)`; // If the current type is 'mixed' then warning the user if ($curType == -1) { string $theMessage = "Changing the interaction type will override the individual values "+ "set through the Option Boxes.\n"+ "This action is not undoable "+ "and Revert or Cancel will not reset these values.\n\n"+ "Do you want to make this change?"; $goAhead = `confirmDialog -t "Information" -messageAlign "left" -message $theMessage -button "OK" -button "Cancel" -defaultButton "Cancel" -cancelButton "Cancel" -parent $gPreferenceWindow`; } if ($goAhead == "OK") { modelWithToolsAll($mode); radioButtonGrp -e -enable 0 modelWithTools3; } else { // Reset the 'mixed' button radioButtonGrp -e -sl 1 -enable 1 modelWithTools3; } } global proc prefsChangeNodeNameScheme(int $mode) { modelNodeNameScheme($mode); } global proc prefPolyChangeMaterial () { global string $gPreferenceWindow; setParent $gPreferenceWindow; int $i = `optionMenuGrp -q -sl colorMaterialPopup`; if ($i==1) polyOptions -np -cm "none"; else if ($i==2) polyOptions -np -cm "ambient"; else if ($i==3) polyOptions -np -cm "ambientDiffuse"; else if ($i==4) polyOptions -np -cm "diffuse"; else if ($i==5) polyOptions -np -cm "specular"; else if ($i==6) polyOptions -np -cm "emission"; } global proc prefPolyUpdateCulling () { global string $gPreferenceWindow; setParent $gPreferenceWindow; int $backfaceCulling = `optionMenuGrp -q -select polyFBackCullPopup`; checkBoxGrp -edit -enable3 ($backfaceCulling != 1) polyVertDispCheck; } global proc prefPolyChangeCulling () { global string $gPreferenceWindow; setParent $gPreferenceWindow; int $val = `optionMenuGrp -q -sl polyFBackCullPopup`; if ($val == 1) { polyOptions -np -bc; } else if ($val == 2) { polyOptions -np -fb; } else if ($val == 3) { polyOptions -np -wbc; } else if ($val == 4) { polyOptions -np -hb; } prefPolyUpdateCulling; } global proc prefAnimTimeCodeChanged() { global string $gPreferenceWindow; setParent $gPreferenceWindow; int $isTimeCode = `checkBoxGrp -q -v1 timeLine`; textFieldGrp -e -enable $isTimeCode timeCodeOffset; } global proc prefAnimTangentsChanged( int $inTangent ) { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $widget = $inTangent == 1 ? "inTangentType" : "outTangentType"; string $flag = $inTangent == 1 ? "-itt" : "-ott"; string $type = "spline"; int $value = `optionMenuGrp -q -select $widget`; switch( $value ) { case 1: $type = "spline"; break; case 2: $type = "linear"; break; case 3: $type = "clamped"; break; case 4: $type = "flat"; break; case 5: $type = "step"; break; default: break; } evalEcho( "keyTangent -global " + $flag + " " + $type ); } global proc prefAutoKeyCharacterChanged() { int $value = `optionMenuGrp -q -select autoKeyCharacter`; string $type = "standard"; switch( $value ) { case 1: $type = "standard"; break; case 2: $type = "all"; break; } evalEcho( "autoKeyframe -characterOption "+$type ); } global proc prefWndHelpLanguageChanged( int $inSelected ) { global string $gHelpLanguage; switch( $inSelected) { case 1: $gHelpLanguage = "en_US"; textFieldGrp -e -enable false helpLanguageSpecify; break; case 2: $gHelpLanguage = "ja_JP"; textFieldGrp -e -enable false helpLanguageSpecify; break; case 3: $gHelpLanguage = `textFieldGrp -q -text helpLanguageSpecify`; textFieldGrp -e -enable true helpLanguageSpecify; break; } textFieldGrp -e -text $gHelpLanguage helpLanguageSpecify; } global proc prefWndHelpLocationChanged( int $inSelected ) { string $helpLocationStr; switch( $inSelected) { case 1: $helpLocationStr = ""; textFieldGrp -e -enable false helpUrlField; break; case 2: $helpLocationStr = `optionVar -q remoteHelpUrl`; textFieldGrp -e -enable true helpUrlField; break; case 3: $helpLocationStr = `textFieldGrp -q -text helpUrlField`; break; } optionVar -sv helpUrl $helpLocationStr; optionVar -sv remoteHelpUrl `textFieldGrp -q -text helpUrlField`; } //---------------------------------------------------------------- // // Begin section of creation procedures // //---------------------------------------------------------------- global proc prefsCreateAppearance() { global string $gPreferenceWindow; global string $gMainWindow; global string $gCommandWindow; setParent $gPreferenceWindow; string $parent = "prefAppearCol"; // Check to see if this has been created already. if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Interface"; columnLayout -adj true; optionMenuGrp -l "Menu Set" -cc "prefApplyWorkingMode" modeOpts; menuItem -l "Animation"; menuItem -l "Modeling"; menuItem -l "Dynamics"; menuItem -l "Rendering"; if (`about -mac`) { // Fix for Bug #156604 // On the Mac - We do-not provide an option to show/hide Main Menubar // as this is a *really *nasty thing to do*. It is really only // intended for games and such which want to go into fullscreen mode // checkBoxGrp -ncb 1 -cw 2 220 -l "Show Menubar" -h 2 -visible false -l1 "In Main Window" -cc "window -e -mbv #1 $gMainWindow" mainMenubarCheck1; checkBoxGrp -ncb 1 -l "Show Menubar" -cw 2 100 -label1 "In Panels" -cc "toggleMenuBarsInPanels #1" showMenuBarChk; // We do not support showing/hiding of the Title Bar // If you hide the title bar, the user has no way to 'move' the window. // checkBoxGrp -ncb 1 -cw 2 220 -l "Show Title Bar" -l1 "In Main Window" -h 1 -visible false -cc "window -e -titleBar #1 $gMainWindow" mainTitleCheck1; checkBoxGrp -ncb 1 -cw 2 220 -l " " -l1 "In Script Editor" -h 1 -visible false -cc "window -e -titleBar #1 $gCommandWindow" cmdTitleCheck1; } else { checkBoxGrp -ncb 1 -cw 2 220 -l "Show Menubar" -l1 "In Main Window" -cc "window -e -mbv #1 $gMainWindow" mainMenubarCheck1; checkBoxGrp -ncb 1 -l " " -cw 2 100 -label1 "In Panels" -cc "toggleMenuBarsInPanels #1" showMenuBarChk; checkBoxGrp -ncb 1 -cw 2 220 -l "Show Title Bar" -l1 "In Main Window" -cc "window -e -titleBar #1 $gMainWindow" mainTitleCheck1; checkBoxGrp -ncb 1 -cw 2 220 -l " " -l1 "In Script Editor" -cc "window -e -titleBar #1 $gCommandWindow" cmdTitleCheck1; } checkBoxGrp -ncb 1 -cw 2 200 -l "Windows" -l1 "Remember Size and Position" -cc1 "windowPref -enableAll #1" winPrefChk; checkBoxGrp -ncb 1 -l "Command Line" -l1 "Hold Focus" -on1 "optionVar -iv commandLineHoldFocus true; commandLine -e -c \"\" $gCommandLine" -of1 "optionVar -iv commandLineHoldFocus false; commandLine -e -c \"setFocus `paneLayout -q -p1 viewPanes`\" $gCommandLine" focusCheck; radioButtonGrp -nrb 1 -cw 2 200 -l "Open Attribute Editor" -l1 "In Separate Window" -on1 "optionVar -iv aeInMainWindow 0" aeInWindowPrefChk1; radioButtonGrp -nrb 1 -scl aeInWindowPrefChk1 -cw 2 200 -l " " -l1 "In Main Maya Window" -on1 "optionVar -iv aeInMainWindow 1" aeInWindowPrefChk2; radioButtonGrp -numberOfRadioButtons 1 -columnWidth 2 200 -label "Open Tool Settings" -label1 "In Separate Window" -onCommand1 "optionVar -intValue toolSettingsInMainWindow false" toolSettingsInWindowPrefChk1; radioButtonGrp -numberOfRadioButtons 1 -shareCollection toolSettingsInWindowPrefChk1 -columnWidth 2 200 -label "" -label1 "In Main Maya Window" -onCommand1 "optionVar -intValue toolSettingsInMainWindow true" toolSettingsInWindowPrefChk2; optionMenuGrp -l "Expression Editor" -cc "prefExprEdTextEditor 0" textEdOpts; menuItem -l "Expression Editor"; if (`about -nt`) { menuItem -l "Text Editor"; } else if (`about -irix`) { menuItem -l "jot"; menuItem -l "vi"; menuItem -l "vim"; menuItem -l "xemacs"; menuItem -l "Other"; } else if (`about -linux`) { menuItem -l "emacs"; menuItem -l "gvim"; menuItem -l "vi"; menuItem -l "vim"; menuItem -l "xedit"; menuItem -l "xemacs"; menuItem -l "Other"; } if (`about -mac`) { radioButtonGrp -nrb 3 -l "Mouse Tracking" -cw 2 100 -cw 3 100 -la3 "One Button" "Two Button" "Three Button" -on1 "optionVar -iv mayaMacButtonMap 1" -on2 "optionVar -iv mayaMacButtonMap 2" -on3 "optionVar -iv mayaMacButtonMap 3" mouseTracking; } setParent $parent; setUITemplate -popTemplate; prefsUpdateAppearance(); } global proc prefsCreateElements() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefElementsCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Visible UI Elements"; columnLayout -adj true; checkBoxGrp -ncb 1 -label "" -label1 "Status Line" -columnWidth 2 250 -changeCommand "setStatusLineVisible #1" statusLineCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Shelf" -columnWidth 2 250 -changeCommand "setShelfVisible #1" shelfCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Time Slider" -columnWidth 2 250 -changeCommand "setTimeSliderVisible #1" timeSliderCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Range Slider" -columnWidth 2 250 -changeCommand "setPlaybackRangeVisible #1" playbackRangeCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Command Line" -columnWidth 2 250 -changeCommand "setCommandLineVisible #1" commandLineCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Help Line" -columnWidth 2 250 -changeCommand "setHelpLineVisible #1" helpLineCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Toolbox" -columnWidth 2 250 -changeCommand "setToolboxVisible #1" toolboxCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Attribute Editor" -columnWidth 2 250 -changeCommand "setPrefAttrEditorVisible #1" attributeEditorCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Tool Settings" -columnWidth 2 250 -changeCommand "setPrefToolSettingsVisible #1" toolSettingsCheckBox; checkBoxGrp -ncb 1 -label "" -label1 "Channel Box / Layer Editor" -columnWidth 2 250 -changeCommand "setPrefChannelsLayersVisible #1" channelsLayersCheckBox; setParent $parent; setUITemplate -popTemplate; prefsUpdateElements(); } global proc prefsCreateWindows() { global string $gPreferenceWindow; global int $gRaiseHelpBrowserWin; global string $gHelpLanguage; global string $gNewScenePanelConfig; global int $gUseNewScenePanelConfig; global int $gUseScenePanelConfig; global int $gUseSaveScenePanelConfig; setParent $gPreferenceWindow; string $parent = "prefWindowsCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Popup Help"; columnLayout -adj true; int $extraLabelWidth; if (`about -mac`) { // on Mac, adjust the width of extraLabel inorder to position it properly $extraLabelWidth = 60; } else { $extraLabelWidth = 100; } intFieldGrp -l "Display Time" -extraLabel "Seconds" -cw 3 $extraLabelWidth -columnAlign 3 "left" -cc "help -popupDisplayTime #1" popupHelpTime; setParent $parent; // This UI removed in Maya 5.0. // // separator -style "none" -h 5; // // frameLayout -l "Help Browser"; // columnLayout -adj true; // // radioButtonGrp -nrb 1 // -l "Window Selection" // -l1 "Use an Existing Help Browser Window" // -on1 "$gUseHelpBrowserWin = true; $gHelpBrowserWinID =\"\";" // -cw 2 250 // winRBG; // // radioButtonGrp -nrb 1 // -scl winRBG // -l " " // -l1 "Create a New Help Browser Window for Maya Help" // -on1 "$gUseHelpBrowserWin = false; $gHelpBrowserWinID =\"\";" // -cw 2 330 // winRBG2; // // checkBoxGrp -ncb 1 // -l "Window Visibility" // -l1 "Raise Help Browser on a Help Request" // -cc1 "$gRaiseHelpBrowserWin = #1" // -cw 2 250 // visCBG; // Functionality removed before Maya 4.0 shipped. // Needs better integration before being resurrected. // // if (`about -nt`) { // radioButtonGrp -nrb 1 // -cw 2 200 // -l "Open Help" // -l1 "Using External Browser" // -on1 "optionVar -iv helpInMainWindow 0" // helpInWindowPrefChk1; // // radioButtonGrp -nrb 1 // -scl helpInWindowPrefChk1 // -cw 2 200 // -l " " // -l1 "In Main Maya Window" // -on1 "optionVar -iv helpInMainWindow 1" // helpInWindowPrefChk2; // } setParent $parent; separator -style "none" -h 5; frameLayout -l "Help Language"; columnLayout -adj true; radioButtonGrp -nrb 1 -l "" -l1 "English" -on1 "prefWndHelpLanguageChanged(1);" helpLanguageEnglish; radioButtonGrp -nrb 1 -scl helpLanguageEnglish -l "" -l1 "Japanese" -on1 "prefWndHelpLanguageChanged(2);" helpLanguageJapanese; radioButtonGrp -nrb 1 -scl helpLanguageEnglish -l "" -l1 "Other" -on1 "prefWndHelpLanguageChanged(3);" helpLanguageOther; textFieldGrp -l "Specify language" -cc "$gHelpLanguage = `textFieldGrp -q -text helpLanguageSpecify`;" helpLanguageSpecify; setParent $parent; separator -style "none" -h 5; frameLayout -l "Help Location"; columnLayout -adj true; radioButtonGrp -nrb 1 -l "" -l1 "Local" -on1 "prefWndHelpLocationChanged(1);" helpLocationLocal; radioButtonGrp -nrb 1 -scl helpLocationLocal -l "" -l1 "Remote" -on1 "prefWndHelpLocationChanged(2);" helpLocationRemote; textFieldGrp -l "URL" -cc "prefWndHelpLocationChanged(3);" helpUrlField; string $envVar = `getenv "MAYA_HELP_URL"`; if ( size( $envVar ) > 0 ) { text -al "left" -l " Set from env variable MAYA_HELP_URL"; } setParent $parent; separator -style "none" -h 5; frameLayout -l "Panel Configurations" sConfig; columnLayout -adj true sfConfig; checkBoxGrp -ncb 1 -l "When Saving" -l1 "Save Panel Layouts with File" -on1 "$gUseSaveScenePanelConfig = true; file -uc true;" -of1 "$gUseSaveScenePanelConfig = false;file -uc false;" -cw 2 300 saveConfig; checkBoxGrp -ncb 1 -l "When Opening" -l1 "Restore Saved Layouts from File" -on1 "$gUseScenePanelConfig = true; file -uc true;" -of1 "$gUseScenePanelConfig = false;file -uc false;" -cw 2 300 openConfig; radioButtonGrp -nrb 1 -l "Starting New Scenes" -l1 "Keep Current Layout" -on1 "$gUseNewScenePanelConfig = false;" -cw 2 300 newConfig1; radioButtonGrp -nrb 1 -l "" -scl newConfig1 -l1 "Use Layout Specified Below" -on1 "$gUseNewScenePanelConfig = true;" -cw 2 300 newConfig2; optionMenuGrp -l "" -cc "$gNewScenePanelConfig = \"#1\"" configOpts; setParent $parent; setUITemplate -popTemplate; prefsUpdateWindows(); } global proc updateGhostData(int $which, int $val) { int $curr[] = `displayPref -q -ghostFrames`; if (0 == $which) { displayPref -ghostFrames $val $curr[1] $curr[2]; } else if (1 == $which) { displayPref -ghostFrames $curr[0] $val $curr[2]; } else { displayPref -ghostFrames $curr[0] $curr[1] $val; } } global proc prefsCreateDisplay() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefDisplayCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Performance"; columnLayout -adj true; radioButtonGrp -nrb 2 -l "Fast Interaction" -la2 "On" "Off" -on1 "if (!`exists gridMenuUpdate`) {source buildDisplayMenu;} doFastInteractionItem on" -on2 "if (!`exists gridMenuUpdate`) {source buildDisplayMenu;} doFastInteractionItem off" fastRBG; setParent $parent; separator -style "none" -h 5; frameLayout -l "View"; columnLayout -adj true; checkBoxGrp -numberOfCheckBoxes 2 -label "Axes" -labelArray2 "View Axis" "Origin Axis" -changeCommand1 "ToggleViewAxis" -changeCommand2 "ToggleOriginAxis" axisCBG; radioButtonGrp -nrb 2 -l "Grid Plane" -la2 "Show" "Hide" -on1 "grid -tgl on" -on2 "grid -tgl off" gridRBG; radioButtonGrp -nrb 2 -l "Active Object Pivots" -la2 "On" "Off" -on1 "displayPref -activeObjectPivots true" -on2 "displayPref -activeObjectPivots false" activeObjectPivotsRBG; radioButtonGrp -nrb 2 -l "Affected Highlighting" -la2 "On" "Off" -on1 "displayPref -displayAffected true" -on2 "displayPref -displayAffected false" affectedRBG; radioButtonGrp -nrb 3 -l "Wireframe on Shaded" -la3 "Full" "Reduced" "None" -on1 "displayPref -wsa \"full\"" -on2 "displayPref -wsa \"reduced\"" -on3 "displayPref -wsa \"none\"" wireframeOnShadedActiveRBG; radioButtonGrp -nrb 2 -l "Region of Effect" -la2 "On" "Off" -on1 "displayPref -regionOfEffect true" -on2 "displayPref -regionOfEffect false" regionOfEffectRBG; radioButtonGrp -nrb 2 -l "Shade Templates" -la2 "On" "Off" -on1 "displayPref -shadeTemplates true" -on2 "displayPref -shadeTemplates false" shadeTemplatesRBG; setParent $parent; setUITemplate -popTemplate; prefsUpdateDisplay(); } global proc prefsCreateNURBS() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefNURBSCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } int $hasSurfaces = `isTrue SurfaceUIExists`; // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "NURBS Display"; columnLayout -adj true; checkBoxGrp -ncb 3 -l "New Curves" -la3 "Edit Points" "Hulls" "CVs" -cc1 "toggle -nc -ep -state #1" -cc2 "toggle -nc -hull -state #1" -cc3 "toggle -nc -cv -state #1" controlCBG1; if( $hasSurfaces ) { checkBoxGrp -ncb 2 -l "New Surfaces" -la2 "Edit Points" "Hulls" -cc1 "toggle -ns -ep -state #1" -cc2 "toggle -ns -hull -state #1" controlNewSurface1; checkBoxGrp -ncb 2 -l "" -la2 "CVs" "Origins" -cc1 "toggle -ns -cv -state #1" -cc2 "toggle -ns -origin -state #1" controlNewSurface2; intSliderGrp -field true -label "Surface Divisions" -min 0 -max 16 -fmx 64 -cc "displaySmoothness -dc -du #1;displaySmoothness -dc -dv #1;" nurbsDivUV; } intSliderGrp -field true -label "Curve Divisions" -min 1 -max 64 -fmx 128 -cc "displaySmoothness -dc -pw #1" nurbsDivW; if( $hasSurfaces ) { intSliderGrp -field true -label "Shaded Divisions" -min 1 -max 16 -fmx 64 -cc "displaySmoothness -dc -ps #1" nurbsDivS; } setParent $parent; setUITemplate -popTemplate; prefsUpdateNURBS(); } global proc prefsCreatePolys() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefPolysCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } if (!`isTrue "PolygonsExists"`) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Polygon Display"; columnLayout -adj true; // vertices drawing style checkBoxGrp -numberOfCheckBoxes 3 -label "Vertices" -la3 "Display" "Normals" "Backculling" -cc1 "polyOptions -np -dv #1" -on2 "int $dv=`checkBoxGrp -q -v2 polyFacetDispCheck1`; int $v[] = `polyOptions -q -np -f`; if($dv) { if($v[0]) polyOptions -np -dn 1 -pf; else polyOptions -np -dn 1 -pt; } else polyOptions -np -dn 1 -pt" -of2 "int $dv=`checkBoxGrp -q -v2 polyFacetDispCheck1`; if($dv) polyOptions -np -dn 1 -f; else polyOptions -np -dn 0;" -cc3 "polyOptions -np -bcv #1" polyVertDispCheck; separator; radioButtonGrp -numberOfRadioButtons 3 -label "Edges" -la3 "Standard" "Soft/Hard" "Only Hard" -cc1 "polyOptions -np -ae" -cc2 "polyOptions -np -se" -cc3 "polyOptions -np -he" polyEdgeDispRadio; checkBoxGrp -numberOfCheckBoxes 2 -label "Highlight" -l1 "Border Edges" -l2 "Texture Borders" -cw 3 140 -cc1 "polyOptions -np -db #1" -cc2 "polyOptions -np -dmb #1" polyBordEdgeHiliteDispCheck; floatSliderGrp -label "Border Width" -field true /* -cal 1 left */ -min 1 -max 10 -cc "polyOptions -np -sb #1" polyBordEdgeSizeSlider; separator; checkBoxGrp -numberOfCheckBoxes 2 -label "Faces" -la2 "Centers" "Normals" -cc1 "polyOptions -np -dc #1" -on2 "int $dv=`checkBoxGrp -q -v2 polyVertDispCheck`; int $v[] = `polyOptions -q -np -pt`; if($dv) {if($v[0]) polyOptions -np -dn 1 -pf; else polyOptions -np -dn 1 -f; } else polyOptions -np -dn 1 -f" -of2 "int $dv=`checkBoxGrp -q -v2 polyVertDispCheck`; if($dv) polyOptions -np -dn 1 -pt; else polyOptions -np -dn 0;" polyFacetDispCheck1; checkBoxGrp -numberOfCheckBoxes 2 -label "" -la2 "Triangles" "Non-planar" -cc1 "polyOptions -np -dt #1" -cc2 "polyOptions -np -dw #1" polyFacetDispCheck2; separator; checkBoxGrp -numberOfCheckBoxes 2 -label "Show Item Numbers" -la2 "Vertices" "Edges" -cc "int $dv = `checkBoxGrp -q -v1 polyItemDispCheck1`;\ int $de = `checkBoxGrp -q -v2 polyItemDispCheck1`;\ int $df = `checkBoxGrp -q -v1 polyItemDispCheck2`;\ int $dm = `checkBoxGrp -q -v2 polyItemDispCheck2`;\ polyOptions -np -din $dv $de $df $dm; " polyItemDispCheck1; checkBoxGrp -numberOfCheckBoxes 2 -label "" -la2 "Faces" "UVs" -cc "int $dv = `checkBoxGrp -q -v1 polyItemDispCheck1`;\ int $de = `checkBoxGrp -q -v2 polyItemDispCheck1`;\ int $df = `checkBoxGrp -q -v1 polyItemDispCheck2`;\ int $dm = `checkBoxGrp -q -v2 polyItemDispCheck2`;\ polyOptions -np -din $dv $de $df $dm; " polyItemDispCheck2; floatSliderGrp -label "Normals Size" -field true -min 0.02 -max 10 -precision 2 -changeCommand "polyOptions -newPolymesh -sizeNormal #1" polyNormalSizeSlider; separator; checkBoxGrp -numberOfCheckBoxes 1 -label "Color" -l1 "Colored Shading" -cw 2 160 -on1 "polyOptions -np -cs 1;" -of1 "polyOptions -np -cs 0;" colorShadedDisplayCheck; optionMenuGrp -l "Color Material" -cc "prefPolyChangeMaterial" colorMaterialPopup; menuItem -l "None" materialNoneMenuItem; menuItem -l "Ambient" materialAmbientMenuItem; menuItem -l "Ambient+Diffuse" materialAmbDiffMenuItem; menuItem -l "Diffuse" materialDiffuseMenuItem; menuItem -l "Specular" materialSpecularMenuItem; menuItem -l "Emission" materialEmissionMenuItem; setParent -m ..; separator; string $colorChannelStrings[] = {"none", "ambient", "ambientDiffuse", "diffuse", "specular", "emission"}; optionMenuGrp -l "Backface Culling" -cc "prefPolyChangeCulling" polyFBackCullPopup; menuItem -l "Off" backfaceOffMenuItem; menuItem -l "On" backfaceOnMenuItem; menuItem -l "Keep Wire" backfaceWireMenuItem; menuItem -l "Keep Hard Edges" backfaceHardEdgeMenuItem; setParent -m ..; setParent ..; setParent ..; setParent $parent; setUITemplate -popTemplate; prefsUpdatePolys(); } global proc prefsCreateManips() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefManipsCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Manipulator Sizes"; columnLayout -adj true; floatSliderGrp -field true -label "Global Scale" -min 0.1 -max 10 -dc "manipOptions -s #1" -cc "manipOptions -s #1" -pre 2 -step 0.01 manipScale; floatSliderGrp -field true -label "Handle Size" -min 4 -max 100 -dc "manipOptions -hs #1" -cc "manipOptions -hs #1" -pre 2 -step 0.5 manipHS; intSliderGrp -field true -label "Line Size" -min 1 -max 10 -dc "manipOptions -ls #1" -cc "manipOptions -ls #1" -step 1 manipLS; floatSliderGrp -field true -label "Line Pick Size" -min 1 -max 15 -cc "manipOptions -lp #1" -pre 2 -step 1.0 manipLP; floatSliderGrp -field true -label "Previous State Size" -min 1 -max 10 -cc "manipOptions -ps #1" -pre 2 -step 0.01 manipPS; setParent $parent; separator -style "none" -h 5; frameLayout -l "Show Manipulator"; columnLayout -adj true; optionMenuGrp -l "Default Manipulator" -cc "optionVar -iv defaultShowManipulator `optionMenuGrp -query -select defaultManipOpts`" defaultManipOpts; menuItem -label "None"; menuItem -label "Translate"; menuItem -label "Rotate"; menuItem -label "Scale"; menuItem -label "Transform"; menuItem -label "Smart"; setParent $parent; setUITemplate -popTemplate; prefsUpdateManips(); } global proc prefsCreateSettings() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefSettingsCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "World Coordinate System"; columnLayout -adj true; radioButtonGrp -nrb 2 -l "Up Axis" -la2 "Y" "Z" -on1 "setUpAxis \"y\"" -on2 "setUpAxis \"z\"" upAxisRBG; setParent $parent; separator -style "none" -h 5; frameLayout -l "Working Units"; columnLayout -adj true; optionMenuGrp -l "Linear" -cc ("prefWndUnitsChanged \"linear\"") linearOpts; menuItem -l "millimeter"; // menu 1 menuItem -l "centimeter"; // menu 2 menuItem -l "meter"; // menu 3 // menuItem -l "kilometer"; menuItem -l "inch"; // menu 4 menuItem -l "foot"; // menu 5 menuItem -l "yard"; // menu 6 // menuItem -l "mile"; separator -style "none" -h 5; separator -style "none" -h 5; optionMenuGrp -l "Angular" -cc ("prefWndUnitsChanged \"angular\"") angularOpts; menuItem -l "degrees"; menuItem -l "radians"; separator -style "none" -h 5; separator -style "none" -h 5; optionMenuGrp -l "Time" -cc ("prefWndUnitsChanged \"time\"") timeOpts; menuItem -l "Game (15 fps)"; menuItem -l "Film (24 fps)"; menuItem -l "PAL (25 fps)"; menuItem -l "NTSC (30 fps)"; menuItem -l "Show (48 fps)"; menuItem -l "PAL Field (50 fps)"; menuItem -l "NTSC Field (60 fps)"; menuItem -l "milliseconds"; menuItem -l "seconds"; menuItem -l "minutes"; menuItem -l "hours"; separator -style "none" -h 5; separator -style "none" -h 5; checkBoxGrp -label "" -label1 "Keep Keys at Current Frames" -cw 2 240 updateKeys; setParent $parent; separator -style "none" -h 5; frameLayout -l "Tolerance"; columnLayout -adj true; float $min = 0.0001; floatSliderGrp -field 1 -l "Positional" -min $min -max 0.1 -fmn $min -fmx 20.0 -cc "tolerance -l #1" -pre 5 -step 0.05 posTolFloatSliderGrp; floatSliderGrp -field 1 -l "Tangential" -min $min -max 1.0 -fmn $min -fmx 20.0 -pre 5 -step 0.05 -cc "tolerance -a #1" tanTolFloatSliderGrp; setParent $parent; setUITemplate -popTemplate; prefsUpdateSettings(); } global proc prefsCreateAnim() { global string $gPreferenceWindow; global string $gPlayBackSlider; setParent $gPreferenceWindow; string $parent = "prefAnimCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Timeline"; columnLayout -adj true; // Changing the playback range can sometimes affect the start/end // range. Update it in the callback. // floatFieldGrp -l "Playback Start/End" -cal 1 "right" -nf 2 -pre 2 -cc ( "playbackOptions -e -min #1 -max #2; " + "floatFieldGrp -e -v1 " + "`playbackOptions -q -ast` -v2 " + "`playbackOptions -q -aet` rangeSliderBounds; " + "floatFieldGrp -e -v1 " + "`playbackOptions -q -min` -v2 " + "`playbackOptions -q -max` timeSliderBounds;" ) timeSliderBounds; // Changing the start/end range can sometimes affect the playback // range. Update it in the callback. // floatFieldGrp -l "Animation Start/End" -cal 1 "right" -nf 2 -pre 2 -cc ( "playbackOptions -e -ast #1 -aet #2; " + "floatFieldGrp -e -v1 " + "`playbackOptions -q -ast` -v2 " + "`playbackOptions -q -aet` rangeSliderBounds; " + "floatFieldGrp -e -v1 " + "`playbackOptions -q -min` -v2 " + "`playbackOptions -q -max` timeSliderBounds;" ) rangeSliderBounds; separator -style "none" -h 5; radioButtonGrp -nrb 3 -l "Height" -cw 2 100 -cw 3 100 -la3 "1x" "2x" "4x" -on1 "timeControl -e -h 28 $gPlayBackSlider" -on2 "timeControl -e -h 56 $gPlayBackSlider" -on3 "timeControl -e -h 112 $gPlayBackSlider" timeLineSize; radioButtonGrp -l "Key Ticks" -nrb 3 -cw 2 100 -cw 3 100 -la3 "None" "Active" "Channel Box" -on1 "timeControl -e -showKeys none $gPlayBackSlider" -on2 "timeControl -e -showKeys active $gPlayBackSlider" -on3 "timeControl -e -showKeys $gChannelBoxName $gPlayBackSlider" showTicks; checkBoxGrp -l "Options" -ncb 2 -cw 2 100 -la2 "Timecode" "Snapping" -cc1 ("animDisplay -e -tc #1; prefAnimTimeCodeChanged") -cc2 "timeControl -e -snap #1 $gPlayBackSlider;" timeLine; textFieldGrp -label "Timecode Offset" -columnWidth 2 125 -text `animDisplay -q -timeCodeOffset` -enable `animDisplay -q -timeCode` -changeCommand ("animDisplay -timeCodeOffset " + "\"#1\"; " + "textFieldGrp -e -text `animDisplay -q -tco` "+ "timeCodeOffset") timeCodeOffset; setParent $parent; separator -style "none" -h 5; frameLayout -l "Playback"; columnLayout -adj true; radioButtonGrp -nrb 2 -l "Update View" -cw 2 100 -cw 3 100 -la2 "Active" "All" -on1 "playbackOptions -v \"active\"" -on2 "playbackOptions -v \"all\"" playbackView; radioButtonGrp -nrb 3 -l "Looping" -cw 2 100 -cw 3 100 -la3 "Once" "Oscillate" "Continuous" -on1 "playbackOptions -l \"once\"" -on2 "playbackOptions -l \"oscillate\"" -on3 "playbackOptions -l \"continuous\"" playbackLooping; rowLayout -nc 4 -cw4 135 150 65 90 -cal 1 "right" -cal 3 "right" -cat 1 "both" 5 -cat 3 "both" 5 playbackRow; text -l "Playback Speed"; optionMenu -l "" -cc ("prefWndAnimOptionChanged 1") speedOpts; // Create the menu items. Dynamically determine // the labels on them later, with a call to prefWndAnimOptionChanged. // menuItem playbackSpeedFree; menuItem playbackSpeedNormal; menuItem playbackSpeedHalf; menuItem playbackSpeedTwice; menuItem playbackSpeedOther; text -enable 0 -label "Other" playbackSpeedT; // The initial value of this field determines the // "fps" label on the "Other" menu entry, the // first time it's shown. // floatField -enable 0 -value 0 -minValue 0.0 -precision 2 -cc ("prefWndAnimOptionChanged 1") playbackSpeedFF; setParent ..; rowLayout -nc 2 -cw2 135 90 -cal 1 "right" -cat 1 "both" 5 playbackByRow; text -l "Playback by"; // Sometimes we don't get the -by rate we've requested. // Update it after the command's executed so we show the // resulting value. // floatField -value 1 -minValue 0.001 -precision 3 -cc ( "playbackOptions -by #1; " + "floatField -e -value " + "`playbackOptions -q -by` playbackByFF" ) playbackByFF; setParent $parent; setUITemplate -popTemplate; // Update the playback speed menu item labels created above. // prefWndAnimOptionChanged 0; // If the window's up when someone else has changed the current time unit, // we should update. // scriptJob -protected -parent $parent -event timeUnitChanged "prefWndAnimOptionChanged 1"; prefsUpdateAnim(); } global proc prefsCreateModeling() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefModelingCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Output Geometry Type"; columnLayout -adj true; if( `isTrue "SurfaceUIExists"` ) { radioButtonGrp -numberOfRadioButtons 1 -label "Output Geometry as" -l1 "NURBS" -on1 "prefsChangeOutputType 0" modelWithType1; radioButtonGrp -numberOfRadioButtons 1 -scl modelWithType1 -label " " -l1 "Polygons" -on1 "prefsChangeOutputType 1" modelWithType2; radioButtonGrp -numberOfRadioButtons 1 -scl modelWithType1 -label " " -l1 "Beziers" -on1 "prefsChangeOutputType 3" modelWithType3; if( `licenseCheck -m "edit" -typ "model"` ) { radioButtonGrp -numberOfRadioButtons 1 -scl modelWithType1 -label " " -l1 "Subdiv Surfaces" -on1 "prefsChangeOutputType 2" -cw 2 300 modelWithType4; } radioButtonGrp -numberOfRadioButtons 1 -scl modelWithType1 -label " " -l1 "Mixed (Set by individual Option Boxes in menus)" -on1 "prefsUpdateModeling; error \"Set specific types using Option Boxes\";" -cw 2 300 modelWithType5; } setParent $parent; separator -style "none" -h 5; frameLayout -l "NURBS Interaction"; columnLayout -adj true; radioButtonGrp -numberOfRadioButtons 1 -label "Interaction Mode" -l1 "Everything is a Tool" -on1 "prefsChangeToolType 1" -cw 2 300 modelWithTools1; radioButtonGrp -numberOfRadioButtons 1 -scl modelWithTools1 -label " " -l1 "Everything is an Action" -on1 "prefsChangeToolType 0" -cw 2 300 modelWithTools2; radioButtonGrp -numberOfRadioButtons 1 -scl modelWithTools1 -label " " -l1 "Mixed (Set by individual Option Boxes in menus)" -on1 "prefsUpdateModeling; error \"Set specific types using Option Boxes\";" -cw 2 300 modelWithTools3; setParent $parent; setUITemplate -popTemplate; prefsUpdateModeling(); } global proc prefsCreateKeys() { global string $gPreferenceWindow; global string $gPlayBackSlider; setParent $gPreferenceWindow; string $parent = "prefKeysCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Auto Key"; columnLayout -adj true; checkBoxGrp -ncb 1 -l "" -l1 "Auto Key" -cc1 "autoKeyframe -state #1; optionMenuGrp -e -en #1 autoKeyCharacter" autoKey; optionMenuGrp -label "On Character Sets" -cc "prefAutoKeyCharacterChanged" autoKeyCharacter; menuItem -label "Key Modified Attributes" stardardCharAuto; menuItem -label "Key All Attributes" allCharAuto; setParent $parent; frameLayout -l "Rotation Interpolation"; columnLayout -adj true; optionMenuGrp -label "New Curve Default" -cc "optionVar -iv rotationInterpolationDefault `optionMenuGrp -query -select rotationInterpolationDefaultOptions`" rotationInterpolationDefaultOptions; menuItem -label "Independent Euler-Angle Curves" rotationInterpolationDefaultNone; menuItem -label "Synchronized Euler-Angle Curves" rotationInterpolationDefaultEuler; menuItem -label "Synchronized Quaternion Curves" rotationInterpolationDefaultQuaternion; setParent $parent; frameLayout -l "Tangents"; columnLayout -adj true; checkBoxGrp -ncb 1 -cw 2 200 -l "" -l1 "Weighted Tangents" -cc1 "keyTangent -edit -global -weightedTangents #1" weightedTangents; optionMenuGrp -label "Default In Tangent" -cc "prefAnimTangentsChanged 1" inTangentType; menuItem -label "Spline" splineItt; menuItem -label "Linear" linearItt; menuItem -label "Clamped" ClampedItt; menuItem -label "Flat" flatItt; optionMenuGrp -label "Default Out Tangent" -cc "prefAnimTangentsChanged 0" outTangentType; menuItem -label "Spline" splineOtt; menuItem -label "Linear" linearOtt; menuItem -label "Clamped" ClampedOtt; menuItem -label "Flat" flatOtt; menuItem -label "Stepped" steppedOtt; setParent $parent; setUITemplate -popTemplate; prefsUpdateKeys(); } global proc prefsCreateSelect() { global string $gSelItems[]; global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefSelectCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Modifiers"; columnLayout -adj true; checkBoxGrp -ncb 2 -l "" -la2 "Single Marquee Select" "Click Drag Select" -cc1 "selectPref -singleBoxSelection #1" -cc2 "selectPref -clickDrag #1" -cw3 20 180 160 modsCBG1; checkBoxGrp -ncb 2 -l "" -la2 "Affects Active" "Popup Menu Selection" -cc1 "selectPref -affectsActive #1" -cc2 "selectPref -popupMenuSelection #1" -cw3 20 180 160 modsCBG2; checkBoxGrp -ncb 2 -l "" -la2 "Ignore Selection Priority" "Expand Popup List" -cc1 "selectPref -ignoreSelectionPriority #1" -cc2 "selectPref -expandPopupList #1" -cw3 20 180 160 modsCBG3; intSliderGrp -field true -label "Click Box Size" -min 0 -max 100 -fmx 100 -cc "selectPref -clickBoxSize #1" -cw 1 118 clickBoxSizeS; setParent $parent; if (`isTrue "PolygonsExists"`) { separator -style "none" -h 5; frameLayout -l "Polygon Selection"; columnLayout -adj true; radioButtonGrp -numberOfRadioButtons 2 -label "Select Faces with" -l1 "Center" -l2 "Whole Face" -on1 "polySelectConstraint -wholeSensitive off" -on2 "polySelectConstraint -wholeSensitive on" polyFaceSensitiveRadio; setParent $parent; } separator -style "none" -h 5; frameLayout -l "Priority"; formLayout priorForm; textScrollList -h 130 -w 180 -ams true -sc "prefSelectPriorListChanged" priorList; // Add the selection priority items to the list in alphabetical order // int $i; string $sortedSelItems[] = `sort $gSelItems`; for ($i = 0; $i < size($sortedSelItems); $i++) { // Don't add fluids to the UI if we don't // have the right license. // // The "fluid" entry, however, should still // be part of $gSelItems to maintain the // correct relationships between optionVars // and related priority settings when users // switch b/w apps w/ different licenses. // // Since the UI is alphabetically sorted // anyway, any selections here do name // lookups based on the currently selected // item in the scrollList so we don't have // to worry about indices getting out of // sync (since $sortedSelItems will have one // less item than $gSelItems). // if(( $sortedSelItems[$i] == "fluid" ) && ! fluidEditLicenseFound() ) { continue; } textScrollList -e -a $sortedSelItems[$i] priorList; } textScrollList -e -sii 1 priorList; optionMenu -l "Presets" -cc "prefSelectPriorModeChanged" presetOpts; menuItem -l "Custom"; menuItem -l "Animation"; menuItem -l "NURBS"; menuItem -l "Rendering"; menuItem -l "Dynamics"; intFieldGrp -l "Priority" -cw 1 55 -cc "prefSelectPriorValChanged" priorVal; setParent ..; formLayout -e -af priorList "left" 10 -af priorList "top" 0 -af presetOpts "top" 0 -ac presetOpts "left" 20 priorList -ac priorVal "top" 75 presetOpts -ac priorVal "left" 20 priorList priorForm; setParent $parent; setUITemplate -popTemplate; prefsUpdateSelect(); } global proc prefsCreateSnap() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefSnapCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Snapping"; columnLayout -adj true; checkBoxGrp -ncb 1 -l "" -l1 "Use Snap Tolerance" -cc1 "snapMode -useTolerance #1" -cw 2 240 useSnapCBG1; intSliderGrp -field true -label "Snap Tolerance" -min 0 -max 100 -fmx 100 -cc "snapMode -tolerance #1" snapToleranceSG; setParent $parent; frameLayout -l "UV Texture Editor Snapping"; columnLayout -adj true; intSliderGrp -field true -label "UV Snap Tolerance" -min 0 -max 100 -fmx 100 -cc "snapMode -uvTolerance #1" snapUVToleranceSG; setParent $parent; frameLayout -l "Edge Snapping"; columnLayout -adj true; intSliderGrp -field true -label "Snap Magnets" -min 0 -max 10 -fmx 100 -cc "snapMode -edgeMagnet #1" snapMagnetSG; floatSliderGrp -field true -label "Magnet Tolerance" -min 0.0 -max 10.0 -fmx 100.0 -cc "snapMode -edgeMagnetTolerance #1" snapMagnetToleranceSG; setParent $parent; setUITemplate -popTemplate; prefsUpdateSnap(); } global proc prefsCreateSound() { global string $gPreferenceWindow; global string $gPlayBackSlider; setParent $gPreferenceWindow; string $parent = "prefSoundCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Sound"; columnLayout -adj true; radioButtonGrp -nrb 3 -l "Waveform Display" -cw 2 100 -cw 3 100 -la3 "Top" "Bottom" "All" -on1 "timeControl -e -waveform top $gPlayBackSlider" -on2 "timeControl -e -waveform bottom $gPlayBackSlider" -on3 "timeControl -e -waveform both $gPlayBackSlider" soundDisplay; checkBoxGrp -l "Repeat on Hold" -ncb 1 -l1 "" -cc1 ( "rowLayout -e -enable #1 soundRepeatChunkLayout;" + "timeControl -e -repeatOnHold #1 $gPlayBackSlider;" ) soundRepeat; rowLayout -nc 6 -cw6 135 100 100 100 10 10 -cal 1 "right" -cal 2 "left" -cal 3 "left" -cal 4 "left" -cat 1 "both" 5 -cat 2 "left" 5 -cat 3 "left" 5 -cat 4 "left" 5 soundRepeatChunkLayout; text -l "Repeat Size"; radioCollection soundRepeatChunkCollection; radioButton -l "1" -onc "timeControl -e -repeatChunkSize 1 $gPlayBackSlider" soundRepeatChunk1; radioButton -l "2" -onc "timeControl -e -repeatChunkSize 2 $gPlayBackSlider" soundRepeatChunk2; radioButton -l "3" -onc "timeControl -e -repeatChunkSize 3 $gPlayBackSlider" soundRepeatChunk3; // This is the radio button that gets set // when the timeControl's repeat chunk size // isn't 1, 2, or 3. It's invisible, so we // can get around the fact that one radio // button in a collection MUST always be // selected. // radioButton -l "4" -visible false soundRepeatChunk4; floatField -visible false soundRepeatChunkValue; setParent $parent; setUITemplate -popTemplate; prefsUpdateSound(); } global proc prefsCreateKin() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefKinCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Inverse Kinematics"; columnLayout -adj true; floatSliderGrp -l "Joint Size" -field 1 -min 0.01 -max 5.0 -pre 2 -dc "jointDisplayScale #1" -cc "jointDisplayScale #1" jdsPrefWidget; floatSliderGrp -l "Ik/Fk Joint Size" -field 1 -min 0.01 -max 5.0 -pre 2 -dc "jointDisplayScale -ikfk #1" -cc "jointDisplayScale -ikfk #1" jdsIkFkPrefWidget; floatSliderGrp -l "IK Handle Size" -field 1 -min 0.01 -max 5.0 -pre 2 -dc "ikHandleDisplayScale #1" -cc "ikHandleDisplayScale #1" hdsPrefWidget; radioButtonGrp -nrb 4 -l "Ik/Fk Blending Display" -cw 2 68 -cw 3 68 -cw 4 68 -cw 5 68 -la4 "None" "Ik" "Fk" "Both" -on1 "ikfkDisplayMethod -display none" -on2 "ikfkDisplayMethod -display ik" -on3 "ikfkDisplayMethod -display fk" -on4 "ikfkDisplayMethod -display ikfk" ikfkDisplay; setParent $parent; setUITemplate -popTemplate; prefsUpdateKin(); } global proc prefsCreateAnimDisplay() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefAnimDispCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Ghosts"; columnLayout -adj true; intSliderGrp -field true -cw3 175 75 150 -label "Steps before Current Frame" -annotation "Number of ghosts drawn at times less than the current time" -min 0 -max 10 -fmx 100 -cc "updateGhostData 0 #1" ghostFramesBeforeSlider; intSliderGrp -field true -cw3 175 75 150 -label "Steps after Current Frame" -annotation "Number of ghosts drawn at times greater than the current time" -min 0 -max 10 -fmx 100 -cc "updateGhostData 1 #1" ghostFramesAfterSlider; intSliderGrp -field true -cw3 175 75 150 -label "Frames Per Step" -annotation "Time increment between ghosts" -min 1 -max 10 -fmx 100 -cc "updateGhostData 2 #1" ghostFrameStepSlider; setParent $parent; setUITemplate -popTemplate; prefsUpdateAnimDisplay(); } global proc prefsCreateDyn() // // Description: // Creates the preference controls for Dynamics. // dynPrefAutoCreate determines whether rigid bodies are automatically // created when a user tries to connect a field to a geometry object. // dynPrefRunupToCurrentTime determines whether the dynamics system // is run up to the new current time position when the user sets the // time slider forward. // dynPrefRunupFrom determines whether the dynamics system // is run up from previous or current time position when the user // sets the time slider forward. // dynPrefSaveRuntimeState determines whether the runtime state // of particle objects, as well as the initial state, gets saved // to file. // // Note that we are dealing with pref values in 3 different places: // The UI controls, which have the current value of the preference // The "current pref", also the current value, which is saved in the TdynStatic // class, and is queried and edited by the "dynPref" action. // The "saved pref", which is saved in the optionVar and is the value which will // be saved to file when maya is quit. // { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefDynCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // If the Dynamics modules isn't loaded, disable everything int $enable = `isTrue "DynamicsExists"`; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Dynamics"; columnLayout -adj true; checkBoxGrp -ncb 1 -l "" -cw 2 200 -l1 "Auto Create Rigid Body" -on1 "dynPref -ac 1" -of1 "dynPref -ac 0" -enable $enable dynAutoCreate; checkBoxGrp -ncb 1 -l "" -cw 2 200 -l1 "Run Up to Current Time" -on1 "dynPrefSetRunup 1" -of1 "dynPrefSetRunup 0" -enable $enable dynRunupToCurrentTime; radioButtonGrp -l "Run Up From" -nrb 2 -la2 "Previous Time" "Start Time" -on1 "dynPref -rf 1" -on2 "dynPref -rf 2" -enable $enable dynRunupFrom; checkBoxGrp -ncb 1 -l "" -cw 2 250 -l1 "Save Startup Cache for Particles" -on1 "dynPref -sr 1" -of1 "dynPref -sr 0" -enable $enable dynSaveRuntimeState; setParent $parent; setUITemplate -popTemplate; prefsUpdateDyn(); } global proc prefsCreateAdvanced() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefAdvancedCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Undo"; columnLayout -adj true; radioButtonGrp -nrb 2 -l "Undo" -la2 "On" "Off" -on1 "undoInfo -state on" -on2 "undoInfo -state off" undoEnableRBG; radioButtonGrp -nrb 2 -l "Queue" -la2 "Infinite" "Finite" -on1 ("undoInfo -infinity on; intFieldGrp -e -enable false queueSizeIFG") -on2 ("undoInfo -infinity off; intFieldGrp -e -enable true queueSizeIFG") queueLimitRBG; intFieldGrp -l "Queue Size" -cc "undoInfo -length #1" queueSizeIFG; setParent $parent; setUITemplate -popTemplate; prefsUpdateAdvanced(); } global proc prefsCreateRendering() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefRenderingCol"; // Check to see if this has been created already. // if (`columnLayout -query -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -height 1 -width 490; frameLayout -l "Rendering"; columnLayout -adjustableColumn true; // Renderer selection option menu string $renderers[] = `renderer -query -namesOfAvailableRenderers`; string $rendererUIName = ""; optionMenu -label "Preferred Renderer" -annotation "Select Preferred Renderer" -changeCommand updatePreferredRendererSel prefRendererOptionMenu; for ($i = 0; $i < size($renderers); $i += 1) { $rendererUIName = `renderer -query -rendererUIName $renderers[$i]`; menuItem -label $rendererUIName -enableCommandRepeat false ("prefRendererOptionMenuItem" +$i); } setParent $parent; setUITemplate -popTemplate; prefsUpdateRendering(); } // Description: called when a selection is made in the preferred renderer // option menu. Sets the preferredRenderer optionVar. // Returns: None // global proc updatePreferredRendererSel() { string $selRenderer = `optionMenu -query -value prefRendererOptionMenu`; string $renderers[] = `renderer -query -namesOfAvailableRenderers`; string $rendererUIName = ""; int $preferredRendererExists = 0; //Get the index of the selected renderer // for ($i = 0; $i < size($renderers); $i++) { $rendererUIName = `renderer -query -rendererUIName $renderers[$i]`; if($selRenderer == $rendererUIName) { $preferredRendererExists = 1; break; } } // If the select renderer is not installed, produce error // if(!$preferredRendererExists) { error -showLineNumber true ($rendererUIName + " does not exist "); } else { optionVar -stringValue "preferredRenderer" $renderers[$i]; } } global proc prefSetProjectVars( string $which ) { string $control; string $value; string $varName; if ( gmatch( $which, "Initial*" ) ) { $control = "initialProject"; $varName = "InitialProject"; } else { $control = "projectsDir"; $varName = "ProjectsDir"; } if ( `textField -q -en $control` ) { string $value = `textField -q -tx $control`; if ( $value != "" ) { optionVar -sv $varName `textField -q -tx $control`; } else { optionVar -rm $varName; } } } global proc int prefSetProjectDir( string $which, string $dir, string $type ) { if ( gmatch( $which, "Initial*" ) ) { textField -e -tx $dir initialProject; } else { textField -e -tx $dir projectsDir; } prefSetProjectVars( $which ); return 1; } global proc prefBrowseForFolder( string $which ) { string $cmd = "prefSetProjectDir \"" + $which + "\""; string $action = "Set " + $which; string $startInDir; if ( gmatch( $which, "Initial*" ) ) { $startInDir = `textField -q -tx initialProject`; if ( size( $startInDir ) == 0 ) { $startInDir = `internalVar -uwd`; } } else { $startInDir = `textField -q -tx projectsDir`; if ( size( $startInDir ) == 0 ) { $startInDir = `internalVar -uwd`; } } if ( `file -q -ex $startInDir` ) { workspace -dir $startInDir; } fileBrowser( $cmd, $action, "", 4 ); } global proc prefsCreateFileIO() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefFileIOCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Project Settings"; string $envVar; columnLayout -adj true -cat "left" 35 -cal "left"; text -l "Default Projects Directory"; columnLayout -adj true -cat "left" 40 -cal "left"; rowLayout -nc 2 -cw2 300 50 -cal 1 "both" -cal 2 "left" -ct2 "both" "left"; textField -cc ( "prefSetProjectVars \"Projects Dir\" " ) projectsDir; symbolButton -image "navButtonBrowse.xpm" -c ( "prefBrowseForFolder \"Projects Dir\" " ) projectsDirBrowser; setParent ..; $envVar = `getenv "MAYA_PROJECTS_DIR"`; if ( size( $envVar ) > 0 ) { text -al "left" -l " Set from env variable MAYA_PROJECTS_DIR"; } setParent ..; separator -st "none" -h 4; text -l "Always Start in This Project"; columnLayout -adj true -cat "left" 40 -cal "left"; rowLayout -nc 2 -cw2 300 50 -cal 1 "both" -cal 2 "left" -ct2 "both" "left"; textField -cc ( "prefSetProjectVars \"Initial Project\" " ) initialProject; symbolButton -image "navButtonBrowse.xpm" -c ( "prefBrowseForFolder \"Initial Project\" " ) initialProjectBrowser; setParent ..; $envVar = `getenv "MAYA_PROJECT"`; if ( size( $envVar ) > 0 ) { text -al "left" -l " Set from env variable MAYA_PROJECT"; } setParent ..; setParent $parent; separator -st "none" -h 5; frameLayout -l "Recent History Size"; columnLayout -cat "left" 0 -cal "center"; columnLayout -cat "left" 15 -cal "center"; intSliderGrp -l "Files" -f true -min 1 -max 20 -s 1 -cc "optionVar -iv \"RecentFilesMaxSize\" #1" RecentFilesMaxSize; setParent ..; columnLayout -cat "left" 15 -cal "center"; intSliderGrp -l "Increments" -f true -min 1 -max 20 -s 1 -cc "optionVar -iv \"RecentBackupsMaxSize\" #1" RecentBackupsMaxSize; setParent ..; columnLayout -cat "left" 15 -cal "center"; intSliderGrp -l "Projects" -f true -min 1 -max 20 -s 1 -cc "optionVar -iv \"RecentProjectsMaxSize\" #1" RecentProjectsMaxSize; setParent ..; setParent ..; setParent $parent; separator -st "none" -h 5; frameLayout -l "Ascii File Compression Mode"; columnLayout -adj true; radioButtonGrp -nrb 3 -l "On File Save" -la3 "Compressed" "Uncompressed" "As Is" -on1 "translator -cmp \"compressed\"" -on2 "translator -cmp \"uncompressed\"" -on3 "translator -cmp \"asCompressed\"" compressionRBG; setParent $parent; separator -style "none" -h 5; frameLayout -l "Display Layer"; columnLayout -adj true; radioButtonGrp -nrb 3 -l "File Import Merge" -la3 "None" "By Number" "By Name" -on1 "optionVar -iv displayLayerMerge 0" -on2 "optionVar -iv displayLayerMerge 1" -on3 "optionVar -iv displayLayerMerge 2" layerMerge; setParent $parent; setUITemplate -popTemplate; prefsUpdateFileIO(); } global proc prefsCreateModules() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefModulesCol"; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "Load on Startup"; columnLayout -adj true; checkBoxGrp -ncb 1 -l "" -cw 1 75 -l1 "Dynamics" -on1 "optionVar -iv loadDynamics 1" -of1 "optionVar -iv loadDynamics 0" packCBG1; checkBoxGrp -ncb 1 -l "" -cw 1 75 -l1 "Paint Effects" -on1 "optionVar -iv loadUrchin 1" -of1 "optionVar -iv loadUrchin 0" packCBG8; // On Mac its not possible to stop the loading of Paint Effects (libUrchin) // and Dynamics on startup, hence do not allow the user to change this preference if (`about -mac`) { checkBoxGrp -e -en false packCBG8; checkBoxGrp -e -en false packCBG1; } setParent $parent; setUITemplate -popTemplate; prefsUpdateModules(); } global proc prefsCreateOpenMaya() { global string $gPreferenceWindow; setParent $gPreferenceWindow; string $parent = "prefOpenMayaCol"; // openMaya prefs are not available on NT if (`about -nt`) return; // Check to see if this has been created already. // if (`columnLayout -q -numberOfChildren $parent` > 0) { return; } // Create the UI // setParent $parent; setUITemplate -pushTemplate prefsTemplate; // This is used to force the width to fill the window separator -style "none" -h 1 -w 490; frameLayout -l "OpenMaya"; columnLayout -adj true; radioButtonGrp -nrb 2 -l "Loading" -cw 1 150 -la2 "Lazy Binding" "Bind Now" -sl (`optionVar -q apiPrefLazyLoading` ? 1 : 2) -on1 "openMayaPref -e -lz true" -on2 "openMayaPref -e -lz false" lazyLoadingCheck; radioButtonGrp -nrb 2 -l "Old Plugin Warning" -cw 1 150 -la2 "Enabled" "Disabled" -sl (`optionVar -q apiPrefOldPluginWarning` ? 1 : 2) -on1 "openMayaPref -e -ow true" -on2 "openMayaPref -e -ow false" oldPluginWarningCheck; setParent $parent; setUITemplate -popTemplate; prefsUpdateOpenMaya(); }